﻿using QMERP.SeedWork;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QMERP.Domain.Entities
{
    /// <summary>
    /// 组织机构
    /// </summary>
    public partial class Organization : FullEntity<long>
    {
        public Organization()
        {
            Organization_Roles = new HashSet<Organization_Role>();
            User_Organizations = new HashSet<User_Organization>();
            Customers = new HashSet<Customer>();
        }
        /// <summary>
        /// 组织机构级别字符串
        /// </summary>
        public string? Level { get; set; }
        /// <summary>
        /// 父Id
        /// </summary>
        public long? PId { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public string Type { get; set; } = "";
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; } = "";
        /// <summary>
        /// 电话号码
        /// </summary>
        public string? Telephone { get; set; }
        /// <summary>
        /// 传真
        /// </summary>
        public string? Fax { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string? Email { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int? Sort { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
        /// <summary>
        /// 组织机构绑定的角色列表
        /// </summary>
        public virtual ICollection<Organization_Role> Organization_Roles { get; set; }
        /// <summary>
        /// 组织机构绑定的用户列表
        /// </summary>
        public virtual ICollection<User_Organization> User_Organizations { get; set; }
        /// <summary>
        /// 客户列表
        /// </summary>
        public virtual ICollection<Customer> Customers { get; set; }
    }
}
